import React from "react";
// 引入ReactDom
import ReactDOM from 'react-dom/client'
import App from "./App.jsx";

import store from './redux/store'

const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(<App />)

// 检测redux中状态的改变，如redux的状态发生了改变，那么重新渲染App组件
store.subscribe(() => {
  store.subscribe(() => {
    root.render(<App />)
  })
})